package animal;


public class Animal {
    public Animal (){
        System.out.println("1.先调用父类中的构造方法");
    }

    //当前类和其子类可见
   protected String name;

    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


    public void eat(String food){
            System.out.println(this.name+"正在吃"+food);
        }

}
